﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CL.Business.BLL;
using CL.Business.Entity;
using CL.Enum.Common;
using CL.Enum.Common.Lottery;
using CL.Tools.Common;
using CL.View.Entity.Business;

namespace CL.UnionWeb.union
{
    public partial class BrokerageDetail : BasePage
    {
        public static int UnionID = 0;
        public static List<udv_MyBrokerageDetail> Entitys = null;
        public static int RecordCount = 0;
        public static int PageIndex = 1;
        public static int PageSize = 10;
        public static string Keys = string.Empty;
        public static int Lot = 0;
        public static int MBID = 0;
        public static List<RebateEntity> LotBrokerageEntity = new List<RebateEntity>();
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "推广联盟-我的佣金";
            if (!IsPostBack)
            {
                Keys = Utils.UrlDecode(Request.QueryString["keys"]);
                string page = Utils.UrlDecode(Request.QueryString["page"]);
                Lot = Convert.ToInt32(Request.QueryString["lot"] ?? "0");
                MBID = Convert.ToInt32(Request.QueryString["mbid"] ?? "0");
                int.TryParse(page, out PageIndex);
                if (PageIndex == 0)
                    PageIndex = 1;
                BindData(Keys);
            }
        }
        public void BindData(string Keys)
        {
            
        }
        
        /// <summary>
        /// 佣金计算
        /// </summary>
        /// <param name="Brokerage"></param>
        /// <returns></returns>
        public string CalculateBrokerage(long Brokerage)
        {
            return (Convert.ToDecimal(Brokerage) / 100).ToString("N") + "￥";
        }
    }
}